import request from '@/utils/request.js'

export const login = (data) => request({
  url: '/v1_0/authorizations',
  method: 'post',
  data
})

export const sendSms = (mobile) => request({
  url: `/v1_0/sms/codes/${mobile}`
})

export const getUserProfile = () => request({
  url: '/v1_0/user/profile'
})

export const editUserProfile = (data) => request({
  method: 'PATCH',
  url: '/v1_0/user/profile',
  data
})

export const editUserPhoto = (data) => request({
  method: 'PATCH',
  url: '/v1_0/user/photo',
  data
})
